<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8" />
    <title>编辑地址</title>
    <meta name="keywords" content="KEYWORDS..." />
    <meta name="description" content="DESCRIPTION..." />
    <meta name="author" content="DeathGhost" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name='apple-touch-fullscreen' content='yes'>
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="format-detection" content="address=no">
    <meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" type="text/css" href="__STATIC__/home/css/style.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/home/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/home/layui/css/layui.css" />
    <style type="text/css">
      .layui-input-block{
        margin-left: 0px;
      }
      .layui-form-item{
        margin-bottom: 0px;
      }
      .layui-input, .layui-textarea{
        padding:20px 10px;
      }
      .layui-form-radio{
        margin: 0px;
        margin-right: 10px;
      }
      .layui-form-switch{
        margin-right: 20px;
        float:right;
      }
    </style>
    <script src="__STATIC__/home/js/jquery.js"></script>
    <!--支付倒计时-->

  </head>
  <body style="background-color: #fff;">
    <form class="layui-form" method="post" action="/home/own/addAddressAction">
      <div class="layui-form-item">
        <div class="layui-input-block">
          <input type="text" name="name" required lay-verify="required" placeholder="请输入收货人" autocomplete="off" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <input type="text" name="tell" required lay-verify="required|phone|number" placeholder="手机号码" autocomplete="off" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item layui-form-text">
        <div class="layui-input-block">
          <textarea name="content" placeholder="请输入详细地址" class="layui-textarea"></textarea>
        </div>
      </div>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <span style="line-height: 36px;height:36px;display: inline-block;margin-left: 10px;">设为默认地址</span>
          <input type="checkbox" name="is_default" lay-skin="switch">
        </div>
      </div>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <span style="line-height: 36px;width: 30%;height:36px;display: inline-block;margin-left: 10px;">地址标签</span>
          <input type="radio" name="tag" value="家" title="家" checked>
          <input type="radio" name="tag" value="公司" title="公司">
          <input type="radio" name="tag" value="学校" title="学校">
        </div>
      </div>
      <div class="layui-form-item">
        <div class="layui-input-block" style="text-align: center;margin-top: 30px;">
          <button class="layui-btn" lay-submit lay-filter="formDemo">保存</button>
          <button type="reset" class="layui-btn layui-btn-primary">重置</button>
          <button type="button" class="layui-btn layui-btn-normal" onclick="goTo();">返回</button>
        </div>
      </div>
    </form>
    {include file="../application/home/view/common/footer.html"}
  </body>

<script type="text/javascript" src="__STATIC__/home/layui/layui.js"></script>
<script>
function goTo(){
  window.location.href="/home/own/address";
}

layui.use('form', function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(formDemo)', function(data){
    //return false;
  });
});
</script>